package cn.edu.hbpu.entity.sys;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

/**
 * @author lcy
 * @date 2022/8/12 13:26
 * @description
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@JsonInclude(JsonInclude.Include.NON_NULL)
@TableName("sys_role")
public class SysRole {
    /**
     * 角色id
     */
    @JsonProperty("roleId")

    private String roleId;

    /**
     * 角色名
     */
    @JsonProperty("roleName")
    private String roleName;

    /**
     * 创建角色的用户id
     */
    @JsonProperty("createBy")
    private String createBy;

    /**
     * 状态
     */
    @JsonProperty("status")
    private int status;

    /**
     * 角色备注
     */
    @JsonProperty("remark")
    private String remark;

    /**
     * 是否被删除，1删除 0未删除
     */
    @JsonIgnore
    @TableLogic
    @JsonProperty("isDeleted")
    private int isDeleted;

    @TableField(fill = FieldFill.INSERT)
    @JsonProperty("createTime")
    private LocalDateTime createTime;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    @JsonProperty("updateTime")
    private LocalDateTime updateTime;
}
